package com.xyzwps.orm.gsql

import com.zaxxer.hikari.HikariDataSource
import groovy.sql.Sql

class App {

    private final Sql sql

    App() {
        def ds = new HikariDataSource(
                jdbcUrl: "jdbc:mysql://localhost:3306/orm",
                driverClassName: "com.mysql.cj.jdbc.Driver",
                username: "scott",
                password: "tiger"
        )
        this.sql = new Sql(ds)
    }

    Sql getSql() {
        return this.sql
    }
}
